package com.jiaai.cloud.gift.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.jiaai.cloud.base.page.FrontPage;
import com.jiaai.cloud.gift.entity.TLiveGiftType;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 直播间礼物设置
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-01
 */
@TableName("t_live_gift")
public class TLiveGiftVO extends FrontPage implements Serializable {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 礼物排序字段
     */
	private Integer sort;
    /**
     * 是否可连续点击
     */
	@TableField("is_continuity")
	private boolean is_continuity;
    /**
     * 礼物名称
     */
	private String name;
    /**
     * 金币
     */
	private Integer glod;

	/**
	 * 主播所得的拥金百分比
	 */
	private  Integer commission;
    /**
     * 礼物图标
     */
	private String icon;
    /**
     * 礼物描诉
     */
	private String details;
    /**
     * 1直播 2聊天室
     */
    @JSONField(serialize = false)
	private String typeId;
    /**
     * 主播增长经验值
     */
	@TableField("anchor_exp")
	private Integer anchorExp;
	@TableField("user_exp")
	private Integer userExp;
	private Date time;

	@TableField(exist = false)
	private List<TLiveGiftTypeVO> giftTypeList;

	public List<TLiveGiftTypeVO> getGiftTypeList() {
		return giftTypeList;
	}

	public void setGiftTypeList(List<TLiveGiftTypeVO> giftTypeList) {
		this.giftTypeList = giftTypeList;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getGlod() {
		return glod;
	}

	public void setGlod(Integer glod) {
		this.glod = glod;
	}

	public String getIcon() throws UnsupportedEncodingException {
		return URLEncoder.encode(icon,"utf-8");
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public Integer getAnchorExp() {
		return anchorExp;
	}

	public void setAnchorExp(Integer anchorExp) {
		this.anchorExp = anchorExp;
	}

	public Integer getUserExp() {
		return userExp;
	}

	public void setUserExp(Integer userExp) {
		this.userExp = userExp;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Integer getCommission() {
		return commission;
	}

	public void setCommission(Integer commission) {
		this.commission = commission;
	}

	public boolean isIs_continuity() {
		return is_continuity;
	}

	public void setIs_continuity(boolean is_continuity) {
		this.is_continuity = is_continuity;
	}



}
